<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>center-block定宽居中</title>
    <style>
        div {
            border: 1px solid red;
            width: 200px;
            margin: 20px auto;
        }
    </style>
</head>
<body>
<div>我需要居中显示</div>
</body>
</html>